Optimal. Leaf size=216 \[ \frac {(11 A-15 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(65 A-93 B) \sin (c+d x)}{15 a d \sqrt {a+a \cos (c+d x)}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {(35 A-39 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{30 a^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.39, antiderivative size = 216, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 7, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {3056, 3062,
3047, 3102, 2830, 2728, 212} \begin {gather*} \frac {(11 A-15 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(35 A-39 B) \sin (c+d x) \sqrt {a \cos (c+d x)+a}}{30 a^2 d}+\frac {(A-B) \sin (c+d x) \cos ^3(c+d x)}{2 d (a \cos (c+d x)+a)^{3/2}}-\frac {(5 A-9 B) \sin (c+d x) \cos ^2(c+d x)}{10 a d \sqrt {a \cos (c+d x)+a}}-\frac {(65 A-93 B) \sin (c+d x)}{15 a d \sqrt {a \cos (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 2728
Rule 2830
Rule 3047
Rule 3056
Rule 3062
Rule 3102
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+a \cos (c+d x))^{3/2}} \, dx &=\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}+\frac {\int \frac {\cos ^2(c+d x) \left (3 a (A-B)-\frac {1}{2} a (5 A-9 B) \cos (c+d x)\right )}{\sqrt {a+a \cos (c+d x)}} \, dx}{2 a^2}\\ &=\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {\int \frac {\cos (c+d x) \left (-a^2 (5 A-9 B)+\frac {1}{4} a^2 (35 A-39 B) \cos (c+d x)\right )}{\sqrt {a+a \cos (c+d x)}} \, dx}{5 a^3}\\ &=\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {\int \frac {-a^2 (5 A-9 B) \cos (c+d x)+\frac {1}{4} a^2 (35 A-39 B) \cos ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{5 a^3}\\ &=\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {(35 A-39 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{30 a^2 d}+\frac {2 \int \frac {\frac {1}{8} a^3 (35 A-39 B)-\frac {1}{4} a^3 (65 A-93 B) \cos (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{15 a^4}\\ &=\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(65 A-93 B) \sin (c+d x)}{15 a d \sqrt {a+a \cos (c+d x)}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {(35 A-39 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{30 a^2 d}+\frac {(11 A-15 B) \int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx}{4 a}\\ &=\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(65 A-93 B) \sin (c+d x)}{15 a d \sqrt {a+a \cos (c+d x)}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {(35 A-39 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{30 a^2 d}-\frac {(11 A-15 B) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{2 a d}\\ &=\frac {(11 A-15 B) \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{2 \sqrt {2} a^{3/2} d}+\frac {(A-B) \cos ^3(c+d x) \sin (c+d x)}{2 d (a+a \cos (c+d x))^{3/2}}-\frac {(65 A-93 B) \sin (c+d x)}{15 a d \sqrt {a+a \cos (c+d x)}}-\frac {(5 A-9 B) \cos ^2(c+d x) \sin (c+d x)}{10 a d \sqrt {a+a \cos (c+d x)}}+\frac {(35 A-39 B) \sqrt {a+a \cos (c+d x)} \sin (c+d x)}{30 a^2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.94, size = 142, normalized size = 0.66 \begin {gather*} \frac {-15 (11 A-15 B) \tanh ^{-1}\left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \cos ^5\left (\frac {1}{2} (c+d x)\right )+\cos ^3\left (\frac {1}{2} (c+d x)\right ) (85 A-141 B+3 (20 A-39 B) \cos (c+d x)+(-10 A+6 B) \cos (2 (c+d x))-3 B \cos (3 (c+d x))) \sin \left (\frac {1}{2} (c+d x)\right )}{15 d (a (1+\cos (c+d x)))^{3/2} \left (-1+\sin ^2\left (\frac {1}{2} (c+d x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(406\) vs.
\(2(189)=378\).
time = 0.33, size = 407, normalized size = 1.88
method | result | size |
default | \(\frac {\sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-96 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (\sin ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+16 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\, \left (5 A +6 B \right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-5 \sqrt {2}\, \left (33 A \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a -8 A \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}-45 B \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a +48 B \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+165 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a A -225 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a B -135 A \sqrt {a}\, \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+255 B \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{60 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{\frac {5}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d}\) | \(407\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 224, normalized size = 1.04 \begin {gather*} -\frac {15 \, \sqrt {2} {\left ({\left (11 \, A - 15 \, B\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (11 \, A - 15 \, B\right )} \cos \left (d x + c\right ) + 11 \, A - 15 \, B\right )} \sqrt {a} \log \left (-\frac {a \cos \left (d x + c\right )^{2} + 2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} \sin \left (d x + c\right ) - 2 \, a \cos \left (d x + c\right ) - 3 \, a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - 4 \, {\left (12 \, B \cos \left (d x + c\right )^{3} + 4 \, {\left (5 \, A - 3 \, B\right )} \cos \left (d x + c\right )^{2} - 12 \, {\left (5 \, A - 9 \, B\right )} \cos \left (d x + c\right ) - 95 \, A + 147 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{120 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^3\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+a\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________